//
//  CMSChartsFiveDayView.m
//  CMSCharts
//
//  Created by symbio on 2023/3/8.
//

#import "CMSChartsFiveDayView.h"
#import "CMSChartsContainerView.h"
#import <Masonry/Masonry.h>
#import <CMSUIKit/CMSUIKit.h>
#import <CMSFoundation/CMSFoundation.h>

@interface CMSChartsFiveDayView ()
@property (nonatomic, strong) CMSChartsContainerView *containerView;
@end
@implementation CMSChartsFiveDayView

- (CMSChartsContainerView *)containerView {
    if (!_containerView) {
        _containerView = [[CMSChartsContainerView alloc] init];
        @weakify(self);
        _containerView.didSelectTagBlock = ^(CombinedChartView * _Nonnull chartsView, NSInteger viewIndex, NSInteger tagIndex, NSString * _Nonnull tag) {
            @strongify(self);
          
        };
    }
    return _containerView;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI {
    [self addSubview:self.containerView];
    [self.containerView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.equalTo(self);
    }];
}

- (void)setContainerModels:(NSArray<CMSChartsContentModel *> *)containerModels {
    _containerModels = containerModels;
    self.containerView.containerModels = containerModels;
}

@end
